<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1"><title id="ed20941">ROLLBACK</title><body><p id="sql_command_desc">Stops the current transaction.</p><section id="section2"><title>Synopsis</title><codeblock id="sql_command_synopsis">ROLLBACK [WORK | TRANSACTION]</codeblock></section><section id="section3"><title>Description</title><p><codeph>ROLLBACK</codeph> rolls back the current transaction and causes
all the updates made by the transaction to be discarded.</p></section><section id="section4"><title>Parameters</title><parml><plentry><pt>WORK</pt><pt>TRANSACTION</pt><pd>Optional key words. They have no effect.</pd></plentry></parml></section><section id="section5"><title>Notes</title><p>Use <codeph>COMMIT</codeph> to successfully end the current transaction.
</p><p>Issuing <codeph>ROLLBACK</codeph> when not inside a transaction does
no harm, but it will provoke a warning message. </p></section><section id="section6"><title>Examples</title><p>To discard all changes made in the current transaction:</p><codeblock>ROLLBACK;</codeblock></section><section id="section7"><title>Compatibility</title><p>The SQL standard only specifies the two forms <codeph>ROLLBACK</codeph>
and <codeph>ROLLBACK WORK</codeph>. Otherwise, this command is fully
conforming.</p></section><section id="section8"><title>See Also</title><p><codeph><xref href="BEGIN.xml#topic1" type="topic" format="dita"/></codeph>, <codeph><xref
            href="COMMIT.xml#topic1" type="topic" format="dita"/></codeph>, <codeph><xref
            href="./SAVEPOINT.xml#topic1" type="topic" format="dita"/></codeph>, <codeph><xref
            href="./ROLLBACK_TO_SAVEPOINT.xml#topic1" type="topic" format="dita"/></codeph></p></section></body></topic>